﻿using CatUtils.Utils.Currency.IoUtils;
using SinaImgUpload.SainTool.Configuration;
using SinaImgUpload.UserView.ServerTool;
using System;
using System.Windows.Forms;

namespace SinaImgUpload.UserView
{
    public partial class ConfigurationControl : UserControl
    {
        public ConfigurationControl()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            new ConfigurationHelper().InitInfo();
        }

        private void button2_Click(object sender, EventArgs e)
        {
            FloderHelper.OpenFloder(ConfigurationValue.ConfigurationPath1);
        }

        private void checkBox1_CheckedChanged(object sender, EventArgs e)
        {
            if (checkBox1.Checked)
            {
                FileHelper.WriteText(ServerHelper.ServerModeFile, "");
            }
            else
                FileHelper.FileDelete(ServerHelper.ServerModeFile);
        }
    }
}